﻿//选择产品类别 ---开始
$(document).ready(function () {
    $("#RoleName").ligerPopupEdit({
        grid: getGridOptions(true),
        valueField: 'Key',
        textField: 'Name'
    });

});

function getGridOptions(checkbox) {
    var options = {
        columns: [
                        { display: 'Key', name: 'key', type: 'text', hide: 1 },
                        { display: '角色编码', name: 'Code' },
                        { display: '角色名称', name: 'Name' },
                        { display: '角色描述', name: 'Name' }
                    ], switchPageSizeApplyComboBox: false,
        url: "../Role/GetJsonOfRoles?rand="+Math.random(),
        method: "GET",
        pageSize: 10,
        checkbox: checkbox
    };
    return options;
}
//var roleData;
//function initRoleData() {
//    $.get("../Role/GetJsonOfRoles", function (data) {
//        roleData = data;
//    });
//}
//添加用户角色 ---结束